// 页面强提示层脚本

// 隐蔽弹出层
function hidePop(divClassName) {
	$("div." + divClassName).hide();
	$("div.pop_shade").hide();
}

// 显示弹出层
function showPop(divClassName) {
	// 计算页面居中位置
	var win_h = $(window).height();
	var win_w = $(window).width();

	var pop_h = $("div." + divClassName).height();
	var pop_w = $("div." + divClassName).width();

	var top = ((win_h - pop_h) / 2) + "px";
	var left = ((win_w - pop_w) / 2) + "px";
	$("div." + divClassName).css('left', left).css('top', top).show();
	var doc_h = $(document).height();
	$("div.pop_shade").height(doc_h).show();
}

function Pop(popHtmlName, divClassName) {
	$.get(popHtmlName, {
				t : Math.random()
			}, function(data) {
				// $("div").remove("." + divClassName);
				$("." + divClassName).html(data);
				showPop(divClassName);
			}, "html");
	$(window).scrollTop(0);
}

function popclose() {
	$('.pop_shade').hide();
	$('.pop380,.pop300,.pop210,.pop_protocol').hide();
};